package com.shop.milk_tea_shop.service;

import com.shop.milk_tea_shop.common.Result;
import com.shop.milk_tea_shop.dto.OrderDetailDTO;
import com.shop.milk_tea_shop.entity.OrderDetail;
import com.baomidou.mybatisplus.extension.service.IService;
import com.shop.milk_tea_shop.request.OrderAddRequest;
import com.shop.milk_tea_shop.request.OrderQueryRequest;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author yjw
 * @since 2024-06-16
 */
public interface OrderDetailService extends IService<OrderDetail> {

    /**
     * 根据下单请求，新建订单并返回订单详情
     * @param request
     * @return
     */
    OrderDetailDTO order(OrderAddRequest request);

    /**
     * 根据订单id获取详情信息
     * @param orderId
     * @return
     */
    OrderDetailDTO getOrderById(String orderId);

    Result<List<OrderDetailDTO>> paged(OrderQueryRequest request);
}
